import Taro, { Component } from '@tarojs/taro'
import { View, Image, Text } from '@tarojs/components'
import PicItem from "../../../components/item/picItem"
import { post } from '../../../service/api'
import './design.scss'

class Design extends Component {
  constructor() {
    super(...arguments)
    this.state = {
      list: []
    }
  }
  async getList() {
    const { data } = await post('home/findzxdesign')
    if (data.code == 0) {
      this.setState({
        list: data.rows
      })
    }
  }
  toPageDes() {
    Taro.navigateTo({ url: '/pages/design/index' })
  }
  componentDidMount() {
    this.getList()
  }
  render() {
    return (
      <View className='h-design'>
        <View className="h-title">装修设计 <View className="more" onClick={this.toPageDes}>更多<Image className="img" src={require("../../../asset/imgs/right2.png")} /></View></View>
        <PicItem list={this.state.list} padding={false} />
      </View>
    )
  }
}

export default Design
